export default {
	state: {
		userInfo: {},
		token: "",
		test: [
			1, 2, 3
		],
		loginInfo: {}
	},
	getters: {},
	mutations: {
		initLogin(state) {
			state.token = uni.getStorageSync('token')
		},
		setToken(state, token) {
			state.token = token
			uni.setStorageSync('token', token)
		},
		setLoginInfo(state, obj) {
			state.loginInfo = obj
			if (obj.saveCount) {
				uni.setStorageSync('account', JSON.stringify(obj))
			} else {
				uni.removeStorageSync('account')
			}

		}
		// changeCondition(state, obj) { // obj是新的条件对象
		// 	state.codi = obj
		// }
	},
	actions: {}
}